<?php
$this->pageTitle = Yii::app()->name;
?>
<?php $link = Yii::app()->params['tanhailong'] ?>
<article data-role="header" class="bar"><h3>FIND HOTELS</h3></article>
<article class="list-hotel">
    <ul data-role="listview" data-inset="true" class="hotel-list">
        <?php foreach ($hotel as $value):
            ?>
            <li class="ui-btn ui-btn-a">
                <div class="photo">
                    <a href="<?=$link?>/<?= $value['hotel'] ?>/about.html" data-ajax="false">
					<img class="ui-li-thumb" src="<?=Yii::app()->theme->baseUrl?>/images/<?=$value['hotel']?>.jpg"></a>
                </div>
                <div class="info">
                    <h3><a data-ajax="false" class="ui-collapsible-heading" href="<?=$link?>/<?= $value['hotel'] ?>/about.html"><?php echo $value['hotelName']; ?></a></h3>
                    <div class="star">
                        <?php
                        $i = 0;
                        while ($i < (int) $value['star']) {
                            echo '<i class="icon-star"></i>';
                            $i++;
                        }
                        if (($value['star'] * 2) % 2) {
                            echo '<i class="icon-star-half"></i>';
                        }
                        ?>
                    </div>
                    <div class="price-info">Price from: <span class="price">$<?= number_format($value['singleNet'], 2, '.', ',') ?></span></div>
                    <div class="area">
                        <?php echo $value['area']; ?>
                    </div>
                    <div class="address">
                        <span></span>
                        <div class="add"><?php echo $value['address']; ?></div>
                    </div>
                    <div class="map">
                        <div class="show-map">
                            <span></span>
                            <a href="<?=$link?>/<?= $value['hotel'] ?>/about.html" data-ajax="false">Show on map</a>
                        </div>
                    </div>
                    <div class="booknow">
                        <a href="<?php echo $link; ?>/<?= $value['hotel'] ?>/search.html" data-ajax="false">BOOK NOW</a>    
                    </div>
                    <div class="arrow"><a href="<?=$link?>/<?= $value['hotel'] ?>.html" class="ui-btn-icon-right ui-icon-carat-r"></a></div>
                    <div class="clr"></div>
            </li>
            <input type="hidden" name="hotel" value="<?php echo $value['hotel'] ?>">
        <?php endforeach; ?>
    </ul>
</article>
<!--END: list-hotel-->